﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <base href="/html/"/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>NetCTOSS</title>
        <link type="text/css" rel="stylesheet" media="all" href="styles/global.css" />
        <link type="text/css" rel="stylesheet" media="all" href="styles/global_color.css" />
        <script language="javascript" type="text/javascript">
            function deleteRole() {
                var r = window.confirm("确定要删除此角色吗？");
                document.getElementById("operate_result_info").style.display = "block";
            }
        </script>
    </head>
    <body>
        <!--Logo区域开始-->
        <div id="header">
            <img src="images/logo.png" alt="logo" class="left"/>
            <a href="#">[退出]</a>            
        </div>
        <!--Logo区域结束-->
        <!--导航区域开始-->
        <div id="navi">                        
            <ul id="menu">
                <li><a href="/common/index" class="index_off"></a></li>
                <li><a href="/role/index" class="role_on"></a></li>
                <li><a href="/adminInfo/index" class="admin_off"></a></li>
                <li><a href="../fee/fee_list.html" class="fee_off"></a></li>
                <li><a href="../account/account_list.html" class="account_off"></a></li>
                <li><a href="../service/service_list.html" class="service_off"></a></li>
                <li><a href="../bill/bill_list.html" class="bill_off"></a></li>
                <li><a href="/report/index" class="report_off"></a></li>
                <li><a href="../user/user_info.html" class="information_off"></a></li>
                <li><a href="../user/user_modi_pwd.html" class="password_off"></a></li>
            </ul>            
        </div>
        <!--导航区域结束-->
        <!--主要区域开始-->
        <div id="main">
            <form action="" method="">
                <!--查询-->
                <div class="search_add">
                    <input type="button" value="增加" class="btn_add" @click="toInsert"/>
                </div>  
                <!--删除的操作提示-->
                <div id="operate_result_info" class="operate_success">
                    <img src="images/close.png" onclick="this.parentNode.style.display='none';" />
                    删除成功！
                </div> <!--删除错误！该角色被使用，不能删除。-->
                <!--数据区域：用表格展示数据-->     
                <div id="data">                      
                    <table id="datalist">
                        <tr>                            
                            <th>角色 ID</th>
                            <th>角色名称</th>
                            <th class="width600">拥有的权限</th>
                            <th class="td_modi"></th>
                        </tr>                      
                        <tr v-for="r in pageInfo.list">
                            <td>{{r.roleId}}</td>
                            <td>{{r.roleName}}</td>
                            <td>{{r.privileges}}</td>
                            <td>
                                <input type="button" value="修改" class="btn_modify" @click="toUpdate(r.roleId)"/>
                                <input type="button" value="删除" class="btn_delete" @click="doDelete(r.roleId)" />
                            </td>
                        </tr>
                    </table>
                </div> 
                <!--分页-->
                <div id="pages">
                    <a v-if="!pageInfo.hasPreviousPage">上一页</a>
                    <a v-else @click="selectPage(pageInfo.prePage,pageInfo.pageSize)">上一页</a>
                    <a v-for="i in pageInfo.navigatepageNums" :class="pageInfo.pageNum===i?'current_page':''" @click="selectPage(i,pageInfo.pageSize)">{{i}}</a>
                    <a v-if="!pageInfo.hasNextPage">下一页</a>
                    <a v-else @click="selectPage(pageInfo.nextPage,pageInfo.pageSize)">下一页</a>
                </div>
            </form>
        </div>
        <script type="text/javascript" src="js/jquery/jquery.js"></script>
        <script type="text/javascript" src="js/layer/layer.js"></script>
        <script type="text/javascript" src="js/axios.js"></script>
        <script type="text/javascript" src="js/vue.js"></script>
        <script type="text/javascript" src="js/role/index.js"></script>
    </body>
</html>
